# 作者：宋安康
# 开发时间：2023/5/9 21:49
# 赋值运算符
a = 3 + 4
print(a)

a1 = a2 = a3 = 20  # 链式赋值
print(a1, id(a1))
print(a2, id(a2))
print(a3, id(a3))

a = 20
print(a)

a += 30
print(a)

a -= 30
print(a)

a *= 30
print(a)

a /= 30
print(a)

a //= 30
print(a)

a, b, c = 20, 30, 40  # 解包赋值
print(a, b, c)

print("交换两个变量的值")
a, b = 10, 20
print("交换之前", a, b)
a, b = b, a
print("交换之后：",a ,b)

